<!DOCTYPE html>
<html lang="en" ng-app="main">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

    </style>

    <script src="angular.min.js"></script>
    <script>
    let mod = angular.module('main',[])

    //mod.config()是专门来配置的
    // $httpProvider是一个工厂，每一个http都是他产生的
    mod.config(function($httpProvider){
    	$httpProvider.defaults.tranformRequest = function (obj) {
            let arr = [];
            for(let name in obj ){
            	arr.push(`${name}=${obj[name]}`)
            }
            return arr.join('&')
	    }
	    $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
    })
    mod.controller('contro',function(){

    })

    </script>
</head>
<body ng-controller="contro">

</body>
<script>

</script>
</html>